﻿@model IEnumerable<PiscoSourDominio.Carta_Local>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    WebGrid grid = new WebGrid(Model);
}
<div class="ContentAdmin">
    <div style="width:100%; text-align:right; padding-right:20px; padding-top:10px">
            @ViewBag.Titulo
    </div>
    <h2>Asignar Platos a Local</h2>
    <h3>
        <a href="@Url.Action("Register", "CartaLocal")" >Nuevo</a></h3>
    @grid.GetHtml(
    columns: grid.Columns(

                        grid.Column(columnName: "idCodCarta", header: "ID", style: "text-align-left"),

                                grid.Column(columnName: "plato.vchNombre", header: "Nombre", style: "text-align-left"),

                                grid.Column(columnName: "plato.vchDescripcion", header: "Descripción", style: "text-align-left"),

                        grid.Column(columnName: "decPrecio", header: "Precio", style: "text-align-left"),

                grid.Column(header: "Acciones", format: (item) =>
                 new HtmlString(
                               Html.ActionLink("Delete", "Delete", new { id = item.idCodCarta }).ToString()
                 )
            )

 ),

   tableStyle: "webgrid",
   headerStyle: "webgrid-header",
   footerStyle: "webgrid-footer",
   alternatingRowStyle: "webgrid-alternating-row",
   selectedRowStyle: "webgrid-selected-row",
   rowStyle: "webgrid-row-style")
    <br />
    <a href="@Url.Action("Index", "Home")" >Regresar</a>
</div>
